package com.xb.loan.cashier.service;


import com.xb.loan.cashier.service.bean.*;
import com.xb.loan.log.exception.BizException;
import com.xb.loan.cashier.service.bean.*;

import java.util.List;
import java.util.Map;

/**
 * 充值业务接口
 */
public interface IChargeOrderService {
    
    /**
     * 根据平台id查询所有可用充值支付渠道
     * 
     * @param platId
     * @param payType
     * @return
     */
    public List<CashierPayChannelBO> queryListByPlatId(String platId, int payType);

    /**
     * 充值接口
     *
     * @param chargeOrderBo 充值记录信息
     * @return
     */
    public ChargeOrderPayBO charge(ChargeOrderBO chargeOrderBo) throws BizException;

    /**
     * 查询充值结果
     *
     * @param orderId 订单号
     * @return 充值结果信息
     */
    public ChargeOrderResultBO queryChargeOrder(String orderId);

    /**
     * 根据平台ID查询平台信息
     * @param platId
     * @return
     */
    public CashierPlatBO queryPlatById(String platId);

    /**
     * 微信充值异步通知处理
     * @param paramXml
     * @param payChannelId
     * @return
     * @throws BizException
     */
    public String wechatChargeNotifyDeal(String paramXml, String payChannelId) throws BizException;

    /**
     * 银联充值同步回调处理
     * @param unionpayParams
     * @param platId
     * @return
     * @throws BizException
     */
    public PayChannelChargeBackBO unionPayChargeBackDeal(Map<String, String> unionpayParams, String platId) throws BizException;
    /**
     * 银联充值异步通知处理
     * @param unionpayParams
     * @return ok/error
     * @throws BizException
     */
    public String unionPayChargeNotifyDeal(Map<String, String> unionpayParams) throws BizException;

    /**
     * 支付宝充值异步通知处理
     * @param alipayParams
     * @param platId
     * @param payChannelId
     * @param tradeType
     * @return success/fail
     * @throws BizException
     */
    public String alipayChargeNotifyDeal(Map<String, String> alipayParams, String platId, String payChannelId, int tradeType) throws BizException;

    /**
     * 支付宝充值同步回调处理
     * @param alipayParams
     * @param platId
     * @param payChannelId
     * @return
     * @throws BizException
     */
    public PayChannelChargeBackBO alipayChargeBackDeal(Map<String, String> alipayParams, String platId, String payChannelId) throws BizException;

    /**
     * 交行充值同步回调处理
     * @param notifyMsg
     * @param platId
     * @return
     * @throws BizException
     */
    public PayChannelChargeBackBO bankcommChargeBackDeal(String notifyMsg, String platId) throws BizException;
    /**
     * 交行充值异步通知处理
     * @param notifyMsg
     * @throws BizException
     */
    public void bankcommChargeNotifyDeal(String notifyMsg) throws BizException;
}
